package designPatterns.factory;
/**
*@author created by zhanxianbo
*@date 2017年10月31日--上午9:30:30
*/
public class Factory {
	public Shap getShap(String type) {
		
		if (type==null) {
			return null;
		} 
		if (type.equalsIgnoreCase("Rectangle")) {
			
			return  new  Rectangle();
		}
		if (type.equalsIgnoreCase("Squary")) {
			
			return  new  Squary();
		}
		if (type.equalsIgnoreCase("Cicle")) {
			
			return new Cicle();
					
		}
		return null;
		
	}

}


